//package cn.wolfcode.web.controller;
//
//import cn.wolfcode.domain.Department;
//import cn.wolfcode.domain.Employee;
//import cn.wolfcode.query.CustomerQueryObject;
//import cn.wolfcode.service.ICustomerService;
//import cn.wolfcode.service.IEmployeeService;
//import com.github.pagehelper.PageInfo;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.ModelAttribute;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//import java.util.List;
//
//@Controller
//@RequestMapping("/customer")
//public class CustomerController {
//    @Autowired
//    private ICustomerService customerService;
//    @Autowired
//    private IEmployeeService employeeService;
//
//    @RequestMapping("/list")
//    public String list(@ModelAttribute("qo") CustomerQueryObject customerQueryObject, Model model)
//    {
//        PageInfo pageInfo = customerService.selectCustomer(customerQueryObject);
//        List<Employee> emps=employeeService.listAll();
//        model.addAttribute("emps",emps);
//        model.addAttribute("pageInfo",pageInfo);
//        return "customer/list";
//    }
//    @RequestMapping("/failList")
//    public String faliList(Model model, @ModelAttribute("qo") CustomerQueryObject customerQueryObject)
//    {
//        customerQueryObject.setStatus(3);//失败客户代号
//        PageInfo pageInfo = customerService.selectCustomer(customerQueryObject);
//        List<Employee> emps=employeeService.listAll();
//        model.addAttribute("emps",emps);
//        model.addAttribute("qo",customerQueryObject);
//        model.addAttribute("pageInfo",pageInfo);
//        return "customerFail/list";
//    }
//    @RequestMapping("/formalList")
//    public String formalList(Model model, @ModelAttribute("qo") CustomerQueryObject customerQueryObject)
//    {
//        customerQueryObject.setStatus(1);//正式客户代号
//        PageInfo pageInfo = customerService.selectCustomer(customerQueryObject);
//        List<Employee> emps=employeeService.listAll();
//        model.addAttribute("emps",emps);
//        model.addAttribute("qo",customerQueryObject);
//        model.addAttribute("pageInfo",pageInfo);
//        return "customer/list";
//    }
//    @RequestMapping("/lostList")
//    public String lostList(Model model, @ModelAttribute("qo") CustomerQueryObject customerQueryObject)
//    {
//        customerQueryObject.setStatus(4);//丢失客户代号
//        PageInfo pageInfo = customerService.selectCustomer(customerQueryObject);
//
//        List<Employee> emps=employeeService.listAll();
//        model.addAttribute("emps",emps);
//
//        model.addAttribute("qo",customerQueryObject);
//        model.addAttribute("pageInfo",pageInfo);
//        return "customer/list";
//    }
//}
